<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图片翻转</title>
    <style>
        .box2{
            width: 229px;
            height: 228px;
            border: 2px solid black;
            /* 视距 景深 */
            perspective: 229px;
            position: relative;
        }
        .img2{
            position: absolute;
            width: 100%;
            height: 100%;
            transition: all 1s linear;
            /* z-index: 2; */
        }
        .box2:hover>.img2{
            perspective: 229px;
            transform: rotateX(180deg);
            
        }
        .img3{
            position: absolute;
            width: 100%;
            height: 100%;
            overflow: hidden;
            transform: rotateX(-180deg);
            transition: all 1s linear;
            /* 如果一个元素经过变化以后，背对用户，就不显示 */
            backface-visibility: hidden;
            /* z-index: 1; */
        }
        .box2:hover>.img3{
            top: 0;
            left: 0;
            perspective: 229px;
            transform: rotateX(0deg);
        }
    </style>
</head>
<body>
    <div class="box2">
        <img src="./img/织造司原创明制国风.png" class="img2" alt="">
        <img src="./img/素材1.png" class="img3" alt="">

    </div>
</body>
</html>